package com.iflytek.day04;

import java.util.Scanner;

public class _13_ForPractice04 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入起始值：");
        int start = sc.nextInt();
        System.out.println("请输入结束值：");
        int end = sc.nextInt();

        int count = 0;
        for (int i = start; i < end; i++) {
            if (i % 3 == 0 && i % 5 == 0) {
                System.out.print(i + "\t");
                count++;

                // 每5个换行输出
                if (count % 5 == 0) {
                    System.out.println();
                }
            }
        }
        System.out.println("\n总个数：" + count);
    }
}
